<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>修德抄经堂</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" type="text/css" href="../bower_components/mui/dist/css/mui.css">
	<link rel="stylesheet" type="text/css" href="../css/base.css">
	<link rel="stylesheet" type="text/css" href="../css/over.css">
	<link rel="stylesheet" type="text/css" href="../css/wancheng.css">
	<link rel="stylesheet" type="text/css" href="../css/full.css">
	<script src="../bower_components/mui/dist/js/mui.min.js"></script>
	<script src="../bower_components/jquery/dist/jquery.js"></script>
</head>
<body>
	<div id="mcover" style="display:none;">
		<img src="../img/guide.png" />
	</div>
	<div class="page">
		<div class="bg"></div>
	   <div class="content">
	   		<div id="main">
	   			<div class="img_bg"></div>
	   			<div class="img_border">
	   				<img src="../img/bore/book.png">
	   				<div class="shuming">
		   				<p class="p1 same">《心经》王羲之行书线装本</p>
		   				<p class="p2 fang">2017.05.05完成    共990字</p>
		   			</div>
	   			</div>
	   			<!--
                	三个图标
                -->
                <ul class="btn">
                	<a href="yinshua.html"><li>
                		<img src="../img/benxin/wancheng.png">
                		<p>印刷</p>
                	</li></a>
                	<a href="read_jingjin.html?x=yiwancheng"><li>
                		<img src="../img/benxin/read.png">
                		<p>阅读</p>
                	</li></a>
                	<a href="#" id="fenxiang"><li>
                		<img src="../img/benxin/fenxiang.png">
                		<p>分享</p>
                	</li></a>
                </ul>
	   		</div>
	   </div>
	</div>
</body>
<script src="../js/common.js"></script>
<script src="../js/resLoader.js"></script>
<script>
	var selectId = getUrlParam('id');

    $.ajax({
        url: '/fe/transcript/user_transcription/'+selectId,
        data: {
            "type": 0,
        },
        success: function (data) {
            var data = data.data;
            var end_time = data.end_time == null  ? '未' : parseISODate(data.end_time).format("yyyy.MM.dd")
            if (data.vow_time != null) var vow_time = parseISODate(data.vow_time).format("yyyy.MM.dd")
            else vow_time = "未";
            var time = '<p class="p2 fang">'+vow_time+'完成    共'+data.sutra_info.total_char_num+'字</p>'
            var text = '<p class="p1 same">'+data.sutra_info.name+'</p>'
			$('.img_border').empty().append('<img src='+data.sutra_info.cover_url+'>\n' +
                '\t   \t\t\t\t<div class="shuming">\n' +
                '<p class="p1 same">'+data.sutra_info.name+'</p>'+
                '<p class="p2 fang">'+vow_time+'完成    共'+data.sutra_info.total_char_num+'字</p>'+
                '\t\t   \t\t\t</div>')
        }
    })
</script>
<script>
	$('.img_bg').height($('.img_border img').height()+21);
	$('.shuming').width($('.img_border img').width()+20)
</script>
<script>
    $('#fenxiang').on('tap',function () {
        $("#mcover").css("display","block");
        wx.onMenuShareTimeline({
            title:'修德抄经堂',
            link:'http://bk-bbe.com/web/front/read_jingjin.html?x=yiwancheng',
            imgUrl: '', // 分享图标
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        })
        var userTranscriptionID = localStorage.getItem('userTranscriptionID');
        // var a = 'http://bk-bbe.com/web/front/zhuchao.html?id='+userTranscriptionID+"&vid="+versionId;
        var a = 'http://bk-bbe.com/web/front/read_jingjin.html?x=yiwancheng';
        wx.onMenuShareAppMessage({

            title: '修德抄经堂', // 分享标题

            desc: '', // 分享描述

            link: a, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致

            imgUrl: '', // 分享图标

            type: '', // 分享类型,music、video或link，不填默认为link

            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空

            success: function () {

                // 用户确认分享后执行的回调函数

            },

            cancel: function () {

                // 用户取消分享后执行的回调函数

            }
        })
        $("#mcover").click(
            function(){
                $("#mcover").css("display","none");  // 点击弹出层，弹出层消失
            });
    })
</script>
</html>